<template>
    <div class="ask-empty-text-box">
        <div class="ask-empty-text-body">
            <div class="ask-empty-text-icon" :class="[icon]"></div>
            <div class="ask-empty-text"><slot>{{ text }}</slot></div>
        </div>
    </div>
</template>

<script lang="ts">
import { Component, Prop, Vue } from "vue-property-decorator";

@Component
export default class EmptyText extends Vue {
    @Prop({
        type: String,
        default: "暂无相关数据"
    }) readonly text!: string;

    @Prop({
        type: String,
        default: "el-icon-hot-water"
    }) readonly icon!: string;
}
</script>
<style lang="scss" scoped>
.ask-empty-text-box {
    width: 100%;
    height: 100%;
    padding: 48px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}
.ask-empty-text-body {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-flow: column;
    color: #999;
}
.ask-empty-text-icon {
    font-size: 80px;
    height: 90px;
    color: inherit;
}
.ask-empty-text {
    font-size: 16px;
    color: inherit;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 12px 0;
}
</style>
